#include "Trial.h"

Trial::Trial()
{

}

Trial::Trial(QDomElement trialElement){

    //retrieve all action elements at current level
    QDomNodeList actionNodeList = trialElement.childNodes();
    //iterate over each action in the list
    for(int i = 0; i < actionNodeList.count(); i++)
    {
        //convert the node to an element
        QDomElement actionElement = actionNodeList.at(i).toElement();
        QString elementName = actionElement.tagName();
        if(elementName == "Folder")
            Actions.push_back(*(new Folder(actionElement)));
//        else if(elementName == "Card")
//
//            break;
//        case "Buzzer":
//            break;
//        case "Food":
//            break;
//        case "GoTo":
//            break;
//        case "HouseLight":
//            break;
//        case "Prl":
//            break;
//        case "Stop":
//            break;
//        case "Delay":
//            break;
//        case "Counter":
//            break;
    }
}
